package com.quentinbeauperin.twitbird
{
	import flash.display.Bitmap;
	import flash.display.SimpleButton;
	import flash.display.Sprite;
	
	public class Bouton extends Sprite
	{
		public var bouton:SimpleButton;
		public var id:int = new int();
		
		// Create the bouton depending on the specified id, and place it on the stage
		public function Bouton(id:int)
		{
			super();
			this.id = id;
			bouton = new SimpleButton();
			
			if (id == 1){
			bouton.upState = new Assets.BoutonMenu1;
			bouton.downState = new Assets.BoutonMenu1;
			bouton.overState = new Assets.BoutonMenu11;
			bouton.hitTestState = new Assets.BoutonMenu11;
			bouton.x = 50;
			bouton.y = 175;
			}
			else if (id == 2){
			bouton.upState = new Assets.BoutonMenu2;
			bouton.downState = new Assets.BoutonMenu2;
			bouton.overState = new Assets.BoutonMenu12;
			bouton.hitTestState = new Assets.BoutonMenu12;
			bouton.x = 175;
			bouton.y = 320;
			}
			else if (id == 3){
			bouton.upState = new Assets.BoutonMenu3;
			bouton.downState = new Assets.BoutonMenu3;
			bouton.overState = new Assets.BoutonMenu13;
			bouton.hitTestState = new Assets.BoutonMenu13;
			bouton.x = 600;
			bouton.y = 175;
			}
			else if (id == 4){
			bouton.upState = new Assets.BoutonMenu4;
			bouton.downState = new Assets.BoutonMenu4;
			bouton.overState = new Assets.BoutonMenu14;
			bouton.hitTestState = new Assets.BoutonMenu14;
			bouton.x = 480;
			bouton.y = 320;
			}
			else if (id == 21){
			bouton.upState = new Assets.BoutonGame1;
			bouton.x = 449;
			bouton.y = 254;
			}
			else if (id == 22){
			bouton.upState = new Assets.BoutonGame2;
			bouton.x = 341;
			bouton.y = 268;
			}
			else if (id == 23){
			bouton.upState = new Assets.BoutonGame3;
			bouton.x = 352;
			bouton.y = 119;
			}
			else if (id == 24){
			bouton.upState = new Assets.BoutonGame4;
			bouton.x = 237;
			bouton.y = 148;
			}
			else if (id == 25){
			bouton.upState = new Assets.BoutonGame5;
			bouton.x = 127;
			bouton.y = 103;
			}
			else if (id == 5){
			bouton.upState = new Assets.ButtonReturn;
			bouton.y = 382;
			bouton.x = 0
			}
			else if (id == 6){
			bouton.upState = new Assets.ButtonReturn;
			bouton.y = 382;
			bouton.x = 702;
			}
			else if (id == 7){
			bouton.upState = new Assets.BoutonPause;
			bouton.y = 390;
			bouton.x = 740;
			}
			else if (id == 8){
			bouton.upState = new Assets.ButtonNext;
			bouton.y = 0;
			bouton.x = 0;
			}
			else if (id == 9){
				bouton.upState = new Assets.ButtonControl1;
				bouton.x = 100;
				bouton.y = 100;
			}
			else if (id == 10){
				bouton.upState = new Assets.ButtonControl2;
				bouton.downState = new Assets.ButtonControl1;
				bouton.overState = new Assets.ButtonControl1;
				bouton.x = 100;
				bouton.y = 100;
			}
			else if (id == 11){
				bouton.upState = new Assets.ButtonStory1;
				bouton.x = 100;
				bouton.y = 100;
			}
			else if (id == 12){
				bouton.upState = new Assets.ButtonStory2;
				bouton.downState = new Assets.ButtonStory1;
				bouton.overState = new Assets.ButtonStory1;
				bouton.x = 100;
				bouton.y = 100;
			}
			
			addChild(bouton);
		}
	}
}